home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / APW.ORCA.Cmds / Gregs.APW.Utils / Documentation / SetFile < prev    next >
Encoding:
Text File  |  1990-07-19  |  3.6 KB  |  93 lines  |  [TEXT/pdos]

  1. SetFile -- Set File Attributes
  2.  
  3. Syntax      SetFile [option...] file...
  4.  
  5. Description Sets attributes for one or more files.  The options apply to all
  6.             files listed.  Files may be listed singly or by the use of the APW
  7.             shell wildcard characters.
  8.  
  9. Input       None.
  10.  
  11. Ouptut      None.
  12.  
  13. Diagnostics Error messages are written to diagnostic output.
  14.  
  15. Status      These status codes may be returned:
  16.  
  17.             0   The attributes for all files were set
  18.             1   Syntax error.
  19.             2   An error occurred.
  20.  
  21. Options     -a 'attributes'
  22.                 Set or clear the file attributes.  The string 'attributes' is
  23.                 composed of the characters listed below.  Attributes that
  24.                 aren't listed remain unchanged.
  25.  
  26.                 D   Destroy enable
  27.                 N   Rename enable
  28.                 B   Backup needed
  29.                 I   Invisible
  30.                 W   Write enable
  31.                 R   Read enable
  32.  
  33.                 Uppercase letters set the attribute to 1; lowercase letters
  34.                 clear it to 0.  For example,
  35.  
  36.                 SetFile -a dnwbR Filename
  37.  
  38.                 Clears the Destroy, Rename, Write, and Backup bits, and sets
  39.                 the Read bit.  This means that file file cannot be deleted,
  40.                 renamed, or written to, but it can be read from.  The backup
  41.                 bit is also cleared, which tells backup programs (such as
  42.                 Backup II) that the file doesn't need to be backed up.  (See
  43.                 the GS/OS reference for a description of the access attribute
  44.                 bits.)
  45.  
  46.             -at 'type'
  47.                 Sets the auxilliary type.  'type' may be specified either in
  48.                 decimal or hexadecimal form.  Hexadecimal numbers must be
  49.                 preceeded by a '$' character or '0x' character sequence.
  50.  
  51.             -c 'date'
  52.                 Set the creation date.  'date' is a string in the form
  53.  
  54.                 "mm/dd/yy [hh:mm[:ss] [AM|PM]]"
  55.  
  56.                 representing the month (1-12), day (1-31), year (0-99), hour
  57.                 (0-23), minute (0-59), and second (0-59).  The string must be
  58.                 quoted if it contains a space.  A period (.) indicates the
  59.                 current date and time.
  60.  
  61.             -m 'date'
  62.                 Set the modification date.  'date' is the same format as for
  63.                 the -c option.  A period (.) indicates the current date and
  64.                 time.
  65.  
  66.             -p
  67.                 Display program title, copyright notice, and progress
  68.                 information.
  69.  
  70.             -t 'type'
  71.                 Sets the file type.  'type' may be specified as a decimal
  72.                 number, a hexadecimal number when preceeded by a '$' or '0x'
  73.                 character(s), or a 3-character filetype mnemonic.  SetFile
  74.                 recognizes the same mnemonics that the Files utility produces
  75.                 in it's extended file listings.
  76.  
  77.  
  78. Examples    SetFile -a b -m . =.asm
  79.  
  80.             Clears the backup-needed access attribute bit, and set's the
  81.             modification date to the current date and time on all files in the
  82.             current directory that end in '.asm'.
  83.  
  84.             SetFile -c "07/03/90 2:25" 2/cinclude/=.h
  85.  
  86.             Sets the creation date to July 3, 1990, and 2:25 A.M. on all files
  87.             in the 2/cinclude directory that end in '.h'.  Note that the date
  88.             string is quoted, since it contains a space, and that A.M. is
  89.             assumed when the hour is less than 13 and no AM or PM is specified.
  90.  
  91. See Also    Files utility (available as part of the 'APW Tools and Interfaces'
  92.             product available from APDA) and GS/OS Reference Volume 1.
  93.